package com.meixiang.activity.homes.insurance;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.meixiang.R;
import com.meixiang.main.BaseActivity;
import com.meixiang.tool.Tool;
import com.meixiang.view.TitleView;

import java.util.ArrayList;

import butterknife.Bind;
import butterknife.ButterKnife;

/**
 * 保单详情
 */
public class PolicyDetailsActivity extends BaseActivity implements View.OnClickListener {

    @Bind(R.id.title)
    TitleView titleView;
    @Bind(R.id.tv_policy_classify)
    TextView tv_policy_classify ; //保险类别
    @Bind(R.id.iv_policy_name_image)
    ImageView iv_policy_name_image ; //保险图片
    @Bind(R.id.tv_policy_number)
    TextView tv_policy_number ; //保单编号
    @Bind(R.id.tv_policy_state)
    TextView tv_policy_state ; //保单状态
    @Bind(R.id.ll_policy_start_date)
    LinearLayout ll_policy_start_date ; //保障开始时间
    @Bind(R.id.tv_start_date)
    TextView tv_start_date ;
    @Bind(R.id.ll_policy_end_date)
    LinearLayout ll_policy_end_date ; //保障结束时间
    @Bind(R.id.tv_end_date)
    TextView tv_end_date ;
    @Bind(R.id.ll_policy_provide_guaranteed)
    LinearLayout ll_policy_provide_guaranteed ;  //提供保障(可点击查看详情)
    @Bind(R.id.ll_policy_provide_money)
    LinearLayout ll_policy_provide_money ; //保障金额
    @Bind(R.id.tv_provide_money)
    TextView tv_provide_money ;
    @Bind(R.id.ll_policy_number)
    LinearLayout ll_policy_number ;//可赔次数
    @Bind(R.id.tv_number)
    TextView tv_number ;
    @Bind(R.id.ll_policy_pay_money)
    LinearLayout ll_policy_pay_money ;//支付金额
    @Bind(R.id.tv_pay_money)
    TextView tv_pay_money ;
    @Bind(R.id.ll_policy_service_hotline)
    LinearLayout ll_policy_service_hotline ; //服务热线
    @Bind(R.id.tv_clause_inform)
    TextView tv_clause_inform ; //保险条款和重要告知
    @Bind(R.id.tv_button)
    TextView tv_button ; //申请理赔按钮





    @Override
    protected void onCreate(Bundle savedInstanceState) {
        setContentView(R.layout.activity_policy_details);
        ButterKnife.bind(this);
        super.onCreate(savedInstanceState);
    }

    @Override
    protected void initTitle() {
        titleView.setTitle(R.string.policy_details);
        titleView.setLeftImageButton(R.mipmap.back);
        titleView.showLeftButton(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });

        tv_button.setOnClickListener(this);
        tv_clause_inform.setOnClickListener(this);

    }





    @Override
    protected void initView() {

    }

    @Override
    protected void setData() {

    }


    @Override
    public void onClick(View v) {

        switch (v.getId()){

            case R.id.tv_button:
                startActivity(new Intent(context,InsuranceClaimsActivity.class));
                break ;

            case R.id.tv_clause_inform:
                Tool.showTextToast(context,"重要告知");
                break;

        }
    }
}
